package com.shd.edanpei.ui.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;
import com.shd.edanpei.bean.RoleBean;

/**
 * Created by mc on 2018/10/19.
 * yang-wen-wen
 */


public class RoleAdapter extends BaseQuickImageAdapter<RoleBean> {

    public RoleAdapter(Context context) {
        super(context, R.layout.item_role);
    }

    @Override
    protected void convert(BaseViewHolder helper, RoleBean item) {
        if (item.isCheck()) {
            ((ImageView) helper.getView(R.id.iv_roleImg)).setImageResource(item.getTagImg());
        } else {
            ((ImageView) helper.getView(R.id.iv_roleImg)).setImageResource(item.getRoleImg());
        }

    }

}